package com.sunny.fetch.pojo;

import javax.persistence.*;

@Table(name = "api_meta_result")
public class ApiMetaResult {
    @Id
    @Column(name = "res_id")
    private Long resId;

    @Column(name = "api_id")
    private Long apiId;

    /**
     * 名称
     */
    @Column(name = "res_name")
    private String resName;

    /**
     * 类型
     */
    @Column(name = "res_type")
    private String resType;

    /**
     * 默认显示
     */
    @Column(name = "default_show")
    private String defaultShow;

    /**
     * 描述
     */
    @Column(name = "res_desc")
    private String resDesc;

    public ApiMetaResult(Long resId, Long apiId, String resName, String resType, String defaultShow) {
        this.resId = resId;
        this.apiId = apiId;
        this.resName = resName;
        this.resType = resType;
        this.defaultShow = defaultShow;
    }

    public ApiMetaResult(Long resId, Long apiId, String resName, String resType, String defaultShow, String resDesc) {
        this.resId = resId;
        this.apiId = apiId;
        this.resName = resName;
        this.resType = resType;
        this.defaultShow = defaultShow;
        this.resDesc = resDesc;
    }

    public ApiMetaResult() {
        super();
    }

    /**
     * @return res_id
     */
    public Long getResId() {
        return resId;
    }

    /**
     * @param resId
     */
    public void setResId(Long resId) {
        this.resId = resId;
    }

    /**
     * @return api_id
     */
    public Long getApiId() {
        return apiId;
    }

    /**
     * @param apiId
     */
    public void setApiId(Long apiId) {
        this.apiId = apiId;
    }

    /**
     * 获取名称
     *
     * @return res_name - 名称
     */
    public String getResName() {
        return resName;
    }

    /**
     * 设置名称
     *
     * @param resName 名称
     */
    public void setResName(String resName) {
        this.resName = resName;
    }

    /**
     * 获取类型
     *
     * @return res_type - 类型
     */
    public String getResType() {
        return resType;
    }

    /**
     * 设置类型
     *
     * @param resType 类型
     */
    public void setResType(String resType) {
        this.resType = resType;
    }

    /**
     * 获取默认显示
     *
     * @return default_show - 默认显示
     */
    public String getDefaultShow() {
        return defaultShow;
    }

    /**
     * 设置默认显示
     *
     * @param defaultShow 默认显示
     */
    public void setDefaultShow(String defaultShow) {
        this.defaultShow = defaultShow;
    }

    /**
     * 获取描述
     *
     * @return res_desc - 描述
     */
    public String getResDesc() {
        return resDesc;
    }

    /**
     * 设置描述
     *
     * @param resDesc 描述
     */
    public void setResDesc(String resDesc) {
        this.resDesc = resDesc;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", resId=").append(resId);
        sb.append(", apiId=").append(apiId);
        sb.append(", resName=").append(resName);
        sb.append(", resType=").append(resType);
        sb.append(", defaultShow=").append(defaultShow);
        sb.append(", resDesc=").append(resDesc);
        sb.append("]");
        return sb.toString();
    }
}